using ns0;
using ns4;
using System;
using System.Collections.Generic;
using System.Text;
namespace ns9
{
	public sealed class UPCAReader : UPCEANReader
	{
		private UPCEANReader upceanreader_0 = new EAN13Reader();
		internal override BarcodeFormat BarcodeFormat
		{
			get
			{
				return BarcodeFormat.UPC_A;
			}
		}
		public override Result decodeRow(int rowNumber, BitArray bitArray_0, int[] startGuardRange, Dictionary<object, object> hints)
		{
			return UPCAReader.smethod_6(this.upceanreader_0.decodeRow(rowNumber, bitArray_0, startGuardRange, hints));
		}
		public override Result decodeRow(int rowNumber, BitArray bitArray_0, Dictionary<object, object> hints)
		{
			return UPCAReader.smethod_6(this.upceanreader_0.decodeRow(rowNumber, bitArray_0, hints));
		}
		public override Result decode(BinaryBitmap image)
		{
			return UPCAReader.smethod_6(this.upceanreader_0.decode(image));
		}
		public override Result decode(BinaryBitmap image, Dictionary<object, object> hints)
		{
			return UPCAReader.smethod_6(this.upceanreader_0.decode(image, hints));
		}
		protected internal override int decodeMiddle(BitArray bitArray_0, int[] startRange, StringBuilder resultString)
		{
			return this.upceanreader_0.decodeMiddle(bitArray_0, startRange, resultString);
		}
		private static Result smethod_6(Result result_0)
		{
			string text = result_0.Text;
			if (text.get_Chars(0) != '0')
			{
				throw ReaderException.Instance;
			}
			return new Result(text.Substring(1), null, result_0.ResultPoints, BarcodeFormat.UPC_A);
		}
	}
}
